import { request } from '@/common/request/index.js';
import ApiBase from '@/utils/apiBase';
// import { GET, POST, PUT, DELETE } from '@/utils/request';
// // 授权登录（不带重试）
// export const wxLogin = (data: { code: string }) => POST(
//     'client/user/pub/loginByWeixin',
//     data
// );

// 授权登录

export const wxLogin = (data: { code: string }) => ApiBase.post('pub/miniProgramLogin', data);

//获取挪车码列表
export const getAListCarTransferCodes = () => ApiBase.get('Vehicles/index');
export const subMessageTemplateList = () => ApiBase.get('pub/subMessageTemplateList');
export const getSettingInfo = () => ApiBase.get('user/getSettings');
export const getMergeTemplates = (param) => ApiBase.get('MergeTemplates/index',param);
export const vehiclesDetails = (param) => ApiBase.get('Vehicles/details',param);
export const getTemplateCodeDetails = (param) => ApiBase.get('MergeTemplates/getTemplateCodeDetails',param);
export const getVehicleRequestDetail = (param) => ApiBase.get('VehicleRequest/getVehicleRequestDetail',param);
export const getDetailsByKey = (param) => ApiBase.get('Vehicles/getDetailsByKey',param);
export const VehicleRequestList = (param) => ApiBase.get('VehicleRequest/list',param);
export const recentlyMovedTheCar = () => ApiBase.get('VehicleRequest/recentlyMovedTheCar');
export const getBindVxBotStatus = () => ApiBase.get('user/getBindVxBotStatus');
export const vehiclesAdd = (data) => ApiBase.post('Vehicles/add',data);
export const vehiclesEdit = (data) => ApiBase.post('Vehicles/edit',data);
export const vehiclesDel = (data) => ApiBase.post('Vehicles/del',data);
export const sendMoveRequest = (data) => ApiBase.post('Vehicles/sendMoveRequest',data);
export const saveSetting = (data) => ApiBase.post('user/saveSetting',data);
export const replyToTheOwner = (data) => ApiBase.post('VehicleRequest/replyToTheOwner',data);
export const complete = (data) => ApiBase.post('VehicleRequest/complete',data);
export const blackList = (data) => ApiBase.post('VehicleRequest/blackList',data);
export const checkWebHook = (data) => ApiBase.post('user/checkWebHook',data);

export const getATemplateCode = (data) => ApiBase.post('MergeTemplates/getATemplateCode',data);
